/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ecom.exceptions;

/**
 *
 * @author Mariam Soumaré
 */
import javax.ejb.ApplicationException;

@ApplicationException(rollback = true)
public class EcomException extends RuntimeException {

    private static final long serialVersionUID = 1L;
    // champs privés
    private int code = 0;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    // constructeurs
    public EcomException() {
        super();
    }

    public EcomException(String message) {
        super(message);
    }

    public EcomException(String message, Throwable cause) {
        super(message, cause);
    }

    public EcomException(Throwable cause) {
        super(cause);
    }

    public EcomException(String message, int code) {
        super(message);
        setCode(code);
    }

    public EcomException(Throwable cause, int code) {
        super(cause);
        setCode(code);
    }

    public EcomException(String message, Throwable cause, int code) {
        super(message, cause);
        setCode(code);
    }
}
